package com.wao.file.web.rest.vm;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.HashSet;
import java.util.Set;

/**
 * View Model object for storing keys in batch operation.
 */
public class BatchKeyVM {

    private Set<String> keys = new HashSet<>();

    public Set<String> getKeys() {
        return keys;
    }

    public void setKeys(Set<String> keys) {
        this.keys = keys;
    }

    @JsonIgnore
    public String[] getKeysArray() {
        String[] array = new String[this.keys.size()];
        return keys.toArray(array);
    }

    @Override
    public String toString() {
        return "BatchKeyVM{" +
            "keys=" + keys +
            '}';
    }
}
